class BaseModel{
    constructor(data, message) {
        if(typeof data == 'string')
        {
            this.message = data;
            data = null;
            message = null;
        }
        if (data) {
            this.data = data;
        }
        if (message) {
            this.message = message;
        }
    }
}

//成功模型

class successModel extends BaseModel{
    constructor(data, message) {
        super(data,message)
        this.tag = true;
    }
}

class failModel extends BaseModel{
    constructor(data, message) {
        super(data,message)
        this.tag = false;
    }
}

module.exports = {
    successModel,
    failModel,
}